package com.example.result.explore

import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.material3.Card
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp

@OptIn(ExperimentalFoundationApi::class)
@Composable
fun ColumShow() {
    LazyColumn {
        for (head in 'A'..'Z') {
            stickyHeader {
                Card {
                    Text(
                        text = "title:$head",
                        modifier = Modifier.padding(horizontal = 16.dp, vertical = 8.dp)
                    )
                }
            }
            items(5) {
                Surface(
                    modifier = Modifier
                        .fillMaxWidth()
                        .padding(8.dp), color = Color.Cyan
                ) {
                    Text(
                        text = "item:$head-$it",
                        modifier = Modifier.padding(horizontal = 16.dp, vertical = 8.dp)
                    )
                }
            }
        }
    }
}